<?php
/* @var $this ProfessionController */
/* @var $model Profession */
/* @var $form CActiveForm */
?>

<div class="wide form">

    <?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm', array(
	'action'=>Yii::app()->createUrl($this->route),
	'method'=>'get',
)); ?>

                    <?php echo $form->textFieldControlGroup($model,'name',array('span'=>5,'maxlength'=>256,'placeholder' => Yii::t('profession_messages','profession.name'), 'label' => false)); ?>

                    <?php echo $form->textFieldControlGroup($model,'mobile',array('span'=>5,'placeholder' => Yii::t('profession_messages','profession.mobile'), 'label' => false)); ?>

                    <?php echo $form->textFieldControlGroup($model,'email',array('span'=>5,'maxlength'=>256,'placeholder' => Yii::t('profession_messages','profession.email'), 'label' => false)); ?>

                    <?php echo $form->dropDownListControlGroup($model, 'professionType_id',
       				 CHtml::listData(ProfessionType::model()->findAll(), 'id', 'nameLocalized'), array('prompt' => Yii::t('profession_messages','search.all.professionTypes'), 'label' => false)); ?>
			
					<div class="row">
						 <?php
			                echo $form->dropDownList($model,'state_id', CHtml::listData(State::model()->findAll(), 'id', 'nameLocalized'), array(
			                    'prompt' => Yii::t('profession_messages','search.all.states'),
			                    'ajax' => array(
			                        'type' => 'POST',
			                        'url' => CController::createUrl('profession/ajaxGetRegionsSearch'),
			                        'update' => '#region_id',
			                        'data' => array('state_id' => 'js:this.value'),
			                        )));
			
			                ?>
					</div>
					
					<div class="row">
						<?php echo $form->dropDownList($model,'region_id', CHtml::listData(Region::model()->findAll('state_id=:state_id',array(':state_id'=>$model->state_id)), 'id', 'nameLocalized'),array('prompt' => Yii::t('profession_messages','search.all.regions'),'id'=>'region_id')); ?>
						 
					</div> 
        <div class="row buttons">
        <?php echo TbHtml::submitButton(Yii::t('default','search.label'),  array('color' => TbHtml::BUTTON_COLOR_PRIMARY,));?>
    	</div>

    <?php $this->endWidget(); ?>

</div><!-- search-form -->